package com.health.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.health.entity.UserModel;
import com.health.service.HealthService;
import com.health.service.UserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Arrays;

@RestController
@RequestMapping("/health")
public class HealthInfoController {

    @Resource
    private HealthService healthService;

    @GetMapping("/diseaseAssess")
    public R getDiseaseAssessInfo(Integer userId){
        return R.ok(healthService.getDiseaseAssessInfo(userId));
    }

    @GetMapping("/healthLevel")
    public R getHealthLevelInfo(Integer userId) {
        return R.ok(healthService.getHealthLevelInfo(userId));
    }

    // 运动推荐
    @GetMapping("/motionRecommend")
    public R motionRecommend(Integer userId){
        return R.ok(healthService.motionRecommend(userId));
    }

    // 食物推荐
    @GetMapping("/foodRecommend")
    public R foodRecommend(Integer userId){
        return R.ok(healthService.foodRecommend(userId));
    }
}
